package com.msmall.community.space.action.html;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.msmall.base.action.HTMLBaseAction;
import com.msmall.community.bbs.service.TopicManager;
import com.msmall.community.question.service.QuestionManager;

public class FooterprintAction extends HTMLBaseAction{

	private static final long serialVersionUID = -1154576275215953421L;
	
	private static final Log logger = LogFactory.getLog(FooterprintAction.class);

	public TopicManager topicManager;
	public QuestionManager questionManager;
	
	public String topic(){
		try{
			page.setPageSize(10);
			topicManager.getPaginationbyUserid(page, usr);
		}catch(Exception e){
			logger.error(e);
		}
		if(getIsOwner()){
			return "topicOwner";
		}else{
			return "topicViewer";
		}
	}
	
	public String question(){
		try{
			page.setPageSize(10);
			questionManager.getQuestionPaginationByUserid(page, usr);
		}catch(Exception e){
			logger.error(e);
		}
		if(getIsOwner()){
			return "questionOwner";
		}else{
			return "questionViewer";
		}
	}
	
	public void setTopicManager(TopicManager topicManager) {
		this.topicManager = topicManager;
	}
	public void setQuestionManager(QuestionManager questionManager) {
		this.questionManager = questionManager;
	}
	
	
}
